-- 导入响应式api
local r = require "ch7.r"

local reactive = r.reactive
local ref = r.ref
local effect = r.effect

print("rApi", reactive, ref, effect)


local function renderer(domString, container)
    container["content"] = domString
    print("container.content", container["content"])
end

local count = ref(1)

effect(function()
    renderer("<h1>" .. count.value .. "</h1>", {})
end)

count.value = 2;
